package com.huike.report.mapper;

import java.util.List;
import java.util.Map;

import com.huike.report.domain.vo.IndexTodayInfoVO;
import com.huike.report.domain.vo.IndexTodoInfoVO;
import com.huike.report.domain.vo.PicVO;
import org.apache.ibatis.annotations.Param;

import com.huike.clues.domain.vo.IndexStatisticsVo;

/**
 * 首页统计分析的Mapper
 * @author Administrator
 *
 */
public interface ReportMapper {
	/**=========================================基本数据========================================*/
	/**
	 * 获取线索数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getCluesNum(@Param("startTime") String beginCreateTime,
						@Param("endTime") String endCreateTime,
						@Param("username") String username);

	/**
	 * 获取商机数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getBusinessNum(@Param("startTime") String beginCreateTime,
						   @Param("endTime") String endCreateTime,
						   @Param("username") String username);

	/**
	 * 获取合同数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getContractNum(@Param("startTime") String beginCreateTime,
						   @Param("endTime") String endCreateTime,
						   @Param("username") String username);

	/**
	 * 获取合同金额
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Double getSalesAmount(@Param("startTime") String beginCreateTime,
						  @Param("endTime") String endCreateTime,
						  @Param("username") String username);

	/**=========================================今日简报========================================*/
	//线索
       Integer getTodayCluesNum(@Param("username")String username,@Param("now")String now);
       //商机
	     Integer getTodayBusiness(@Param("username")String username,@Param("now")String now);
	     //合同
        Integer getTodayContractNum(@Param("username")String username,@Param("now")String now);
	//成交
	 Double getTodaySaleAmount(@Param("username")String username,@Param("now")String now);
   //等待跟进线索数目
	Integer getTofollowedCluesNum(@Param("beginCreateTime") String beginCreateTime,
								  @Param("endCreateTime") String endCreateTime,
								  @Param("username") String username);
	Integer getTofollowedBusinessNum(@Param("beginCreateTime") String beginCreateTime,
									 @Param("endCreateTime") String endCreateTime,
									 @Param("username") String username);
	Integer getToallocatedCluesNum(@Param("beginCreateTime") String beginCreateTime,
								   @Param("endCreateTime") String endCreateTime,
								   @Param("username") String username);
	Integer getToallocatedBusinessNum(@Param("beginCreateTime") String beginCreateTime,
								   @Param("endCreateTime") String endCreateTime,
								   @Param("username") String username);
	List<PicVO>subjectStatistics(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);

	List<Map> getDataList(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);

	Integer getCluesNums(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime")String endCreateTime);

	Integer geteffectiveCluesNums(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime")String endCreateTime);

	Integer getBusinessNums(@Param("beginCreateTime")String beginCreateTime,  @Param("endCreateTime")String endCreateTime);

	Integer getContractNums(@Param("beginCreateTime")String beginCreateTime,  @Param("endCreateTime")String endCreateTime);


	/**=========================================待办========================================*/

}
